import scala.actors.Actor;
import scala.actors._;

object debugger extends Actor {
	
	private var debug = false;
	object cerrar {};
 
	def act() = {
	  while(true) {
	    receive {
	      case s : String => if(debug) {println("\n*** " + s)};
	      case cerrar => {this exit this};
	    }
	  }
	}
 
	def cambiarModo = {
	  debug = !debug;
	}
}
